import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

//创建一个类，实现文本文件的复制，即能把源路径下的文件复制到目的路径下。
public class FileCopy {

    public static void main(String[] args) throws IOException {

        FileInputStream fis = new FileInputStream("MyFile\\src\\tmp\\fis.txt");
        FileOutputStream fos = new FileOutputStream("MyFile\\src\\tmp\\fos.txt");
        int by;
        while( ( by = fis.read()) != -1){
            fos.write(by);
            fos.flush();
        }
        fis.close();
        fos.close();
    }



}
